package myjobs;

import ircbot.*;
import java.util.Iterator;
import java.util.HashMap;

/**
 * A test job initializer i made, to test the bot. I have not futher documentation for this one.
 *
 * @author andreas
 */
public class EchoJobIniter implements JobInitializer {
    private String cmd = "echo";

    private HashMap<String, Job> jobs = new HashMap<String, Job>();

    public String getCmd() {
        return cmd;
    }

    public void newJob(String name, Bot bot, String channel) {
        jobs.put(name, new EchoJob(bot, channel));
    }

    public void removeJob(String name) {
        jobs.remove(name);
    }

    public Iterator<Job> iterator() {
        return jobs.values().iterator();
    }
}
